package vn.bus.service;

import java.util.ArrayList;

import com.google.gson.Gson;

import vn.bus.models.QuerieManager;
import vn.bus.dto.QuerieDTO;

public class QuerieService {

	public String getAllQueries() {
		String rs = null;
		try {
			ArrayList<QuerieDTO> allQueries = null;
			QuerieManager querieManager = new QuerieManager();
			allQueries = querieManager.getAllQueries();
			Gson gson = new Gson();
			/*System.out.println("QuerieService - method : getAllQueries : "
					+ gson.toJson(allQueries));*/
			rs = gson.toJson(allQueries);

		} catch (Exception e) {
			System.out.println("error");
		}
		return rs;
	}
}
